import {
	createSSRApp
} from "vue";
import App from "./App.vue";
import uviewPlus from '@/uni_modules/uview-plus'
import {
	get,
	get2,
	post,
	baseUrl
} from '@/utils/request'
import {
	okShow,
	failShow,
	next,
	next1,
	ToastOk,
	ToastFail,
	downLoad,
	daoChu,
	PhoneCall,
	imgShow,
	savePhoto,
	back 
} from '@/utils/_function.js'

export function createApp() {
	const app = createSSRApp(App);
	 app.config.globalProperties.$get = get
	 app.config.globalProperties.$get2 = get2
	 app.config.globalProperties.$post = post
	 app.config.globalProperties.$okShow = okShow
	 app.config.globalProperties.$failShow = failShow
	 app.config.globalProperties.$next = next
	 app.config.globalProperties.$next1 = next1
	 app.config.globalProperties.$ToastOk = ToastOk
	 app.config.globalProperties.$ToastFail = ToastFail
	 app.config.globalProperties.$baseUrl = baseUrl
	 app.config.globalProperties.$downLoad = downLoad
	 app.config.globalProperties.$daoChu = daoChu
	 app.config.globalProperties.$PhoneCall = PhoneCall
	 app.config.globalProperties.$imgShow = imgShow
	 app.config.globalProperties.$savePhoto = savePhoto
	 app.config.globalProperties.$back = back
	 app.use(uviewPlus)
	return {
		app,
	};
}
